package com.neoharvest.smartagri.model.impl;

import com.neoharvest.smartagri.model.AgriculturalMachine;

public class HarvesterMachine implements AgriculturalMachine {
    private String position = "0,0";
    private double fuelLevel = 100.0;

    @Override
    public void start() {
        System.out.println("Harvester Machine: Starting...");
    }

    @Override
    public void stop() {
        System.out.println("Harvester Machine: Stopping...");
    }

    @Override
    public void executeTask() {
        System.out.println("Harvester Machine: Executing harvesting task...");
        this.fuelLevel -= 7.0;
    }

    @Override
    public String getStatus() {
        return "Harvester Machine: Ready";
    }

    @Override
    public String getPosition() {
        return position;
    }

    @Override
    public double getFuelLevel() {
        return fuelLevel;
    }

    @Override
    public void updatePosition(String position) {
        this.position = position;
        System.out.println("Harvester Machine position updated to: " + position);
    }

    @Override
    public void updateFuelLevel(double fuelLevel) {
        this.fuelLevel = fuelLevel;
        System.out.println("Harvester Machine fuel level updated to: " + fuelLevel);
    }
    
    @Override
    public String getCurrentTask() {
        return "收割任务";
    }
}